<%@page import="javax.sound.midi.SysexMessage"%>
<%@page import="com.mysql.fabric.xmlrpc.base.Data"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="leagal_aid.bean.*,java.util.*,java.io.*" %>
<%
request.setCharacterEncoding("utf-8");
String category = request.getParameter("category");
String  title= request.getParameter("title");
int homepage = Integer.parseInt(request.getParameter("homepage")); 

String  txtDate= request.getParameter("txtDate");
String link = request.getParameter("link");
String content = request.getParameter("data");
String categoryname = request.getParameter("categoryname");

LawBean lawBean = new LawBean();

if(lawBean.doAdd(category,title,homepage,txtDate,link,content,categoryname)){

}else{
	response.setCharacterEncoding("utf-8");
	PrintWriter pout = response.getWriter();
	pout.print("<script>alert('错误'); window.location='../addlaw.jsp' </script>");
	pout.flush();
	pout.close();
	//response.sendRedirect("login.html");
};
%>    